package br.com.interfac;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import br.com.view.FabricaHtml;
import br.com	.view.HtmlPadroes;

public class InicioHome extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    public InicioHome() {
        super();
    }

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		execute(request, response);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		execute(request, response);
	}
	protected void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		PrintWriter out = response.getWriter();
		out.print(HtmlPadroes.IncTopo());
		out.print(FabricaHtml.criarDivSemFec("novotopo"));
		out.print(FabricaHtml.criarImagem("logo-sistema.png", "imgtopo"));
		out.print(FabricaHtml.criarHs(2, "OS Control", "h1topo"));
		
		//out.print(FabricaHtml.criarDivSemFec("menuIni"));
		//out.print(FabricaHtml.criarHs(1, " Gerenciamento de OS", "h1contn"));
		//out.print(HtmlPadroes.menuIni());
		//out.print(FabricaHtml.fechaDiv());
		
		out.print(FabricaHtml.fechaDiv());
		out.print(FabricaHtml.criarDivSemFec("formularioIni"));
		out.print(FabricaHtml.criarFieldsetIni());
		out.print(FabricaHtml.criarDivSemFec("apresenteForm"));
		out.print(FabricaHtml.criarForm("LoginServlet", "post"));
		out.print(FabricaHtml.criarDiv("mensagem-erro", ""));
		out.print(FabricaHtml.criarInputs("E-mail", "text", "email"));
		out.print(FabricaHtml.criarInputs("Senha", "password", "senha"));
		out.print(FabricaHtml.criarInputBotao("submit", "botao_tes", " Logar "));
		out.print(FabricaHtml.criarInputBotao("reset", "botao_tes", " Limpar "));
		out.print(FabricaHtml.fecharForm());
		out.print(FabricaHtml.fechaDiv());
		out.print(FabricaHtml.criarFieldsetFim());
		out.print(FabricaHtml.fechaDiv());
		out.print(FabricaHtml.fechaDiv());
		
		out.print(HtmlPadroes.rodapeSite(""));
	}

}
